/** @jsxImportSource @emotion/react */
import * as React from "react";
import {OriginalViewProps} from "../../common/base";
import {config设备概况, EntranceSetup, Projects默认} from "./orcBase";
import {createItem,} from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {DeviceSurvey} from "../../elevator/editor";
import {ConclusionMVS} from "../editorDJ";
import {AppendixPage} from "./AppendixPage";
import {MaterialReview, PreviousQuestion} from "./MaterialReview";
import {AccessoriesLiquid, AccessoriesValve} from "./Accessories";
import {AddonTest, AddonTestCorros} from "./AddonTest";
import {ProjectListMvs} from "../Projects";


//有独立模板的分项报告（动态加载/非静态编译的）的编辑器是独立配置的，在操作页面上也是单独的。没有和主报告掺和在一起。useSubRepMain("cm/gasproof", {nestMd:'GASPR_TS',;
const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectListMvs  projects={Projects默认}/>),
  createItem('Survey', <DeviceSurvey config={config设备概况} label={'检验结论报告-设备概况'}/>),
  createItem('Conclusion', <ConclusionMVS label={'检验结论报告-下结论'}/>),
  createItem('MaterialReview', <MaterialReview label={'移动式压力容器资料审查报告-概况'}/>),
  createItem('PreviousQuestion', <PreviousQuestion label={'移动式压力容器资料审查报告-结果和上次问题'}/>),

  createItem('AppendixPage', <AppendixPage part={1} label={'容器年度检验报告附页（上）'}/>),
  createItem('ApxIspItms_12', <AppendixPage part={2} label={'容器年度检验报告附页（下）'}/>),
  createItem('Accessories', <AccessoriesValve label={'安全附件检验报告(上)'}/>),
  createItem('AccessoriesLiquid', <AccessoriesLiquid label={'安全附件检验报告(下)'}/>),
  createItem('AddonTest', <AddonTest label={'附加检验报告(上)'}/>),
  createItem('AddonTestCorros', <AddonTestCorros label={'附加检验报告(下)'}/>),
  //嵌入redId nestMd 动态解析URL寻找定位的分项报告原始的不分是独立或者嵌套公用入口编辑器？这里当前做法是直接拷贝import组件的！组件的文件目录都是不相等的！！
  //壁厚测定报告 的 分项控制器：后面不需要要配<Corrosive/>的。 对应/report/THICKM_VS/ver/1/akDHJi77Qh2xTd4BJwdb5FJlcG9ydA/THICKM_VS/_Controller
  createItem('_Controller',  <></>),
];


export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
